//
//  CoreDataManager.h
//  1129CoreData
//
//  Created by dllo on 16/3/9.
//  Copyright © 2016年 巨兔. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

@interface CoreDataManager : NSObject

//上下文,数据管理器
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
//模型管理器
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
//连接器
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

//保存操作
- (void)saveContext;
//返回存储文件路径
- (NSURL *)applicationDocumentsDirectory;

+ (CoreDataManager *)defaults;

-(NSMutableArray *)selectFromEntityName:(NSString *)entityName Attribute:(NSString *)attribute value:(NSString *)value ;


@end
